{* $Id$ *}
{include_core file="admin/lib/header.html" title="发票详情"}
<div class="page-header border-bottom clearfix">
    <h2 class="left">发票详情</h2>
    <a href="{AnUrl("invoice/admin")}" class="btn btn-success btn-sm right">&lt;&nbsp;返回发票列表</a>
</div>

<table class="list-table" style="width:600px">
    <thead>
        <tr>
            <th style="width:100px;">名称</th>
            <th>内容</th>
        </tr>
    </thead>
    <tbody class="js_cup_list">
        <tr>
            <td>公司抬头</td>
            <td>{$invoice.company_name}</td>
        </tr>
        <tr>
          <td>发票金额</td>
          <td>{$invoice.price_sum}</td>
        </tr>
        <tr>
            <td>实开金额</td>
            <td>{if $invoice.actual_price > 0}{$invoice.actual_price}{/if}</td>
        </tr>
        <tr>
            <td>发票类型</td>
            <td>
                {if $invoice.type == 1}
                <span class="label label-primary">{invoice_config::$invoice_type[$invoice.type]}</span>
                {else}
                <span class="label label-warning">{invoice_config::$invoice_type[$invoice.type]}</span>
                {/if}
            </td>
        </tr>
        <tr>
            <td>纳税人识别号</td>
            <td>{$invoice.taxpayer_number}</td>
        </tr>
        <tr>
            <td>开票地址</td>
            <td>{$invoice.billing_address}</td>
        </tr>
        <tr>
            <td>开票电话</td>
            <td>{$invoice.billing_phone}</td>
        </tr>
        <tr>
            <td>开票银行名称</td>
            <td>{$invoice.bank_name}</td>
        </tr>
        <tr>
            <td>银行账号</td>
            <td>{$invoice.bank_number}</td>
        </tr>
        <tr>
            <td>合伙人姓名</td>
            <td>{$invoice.realname}</td>
        </tr>
        <tr>
            <td>合伙人电话</td>
            <td>{$invoice.mobile}</td>
        </tr>
        <tr>
            <td>收件人</td>
            <td>{$invoice.recipient_name}</td>
        </tr>
        <tr>
            <td>联系电话</td>
            <td>{$invoice.recipient_phone}</td>
        </tr>
        <tr>
            <td>所在地区</td>
            <td>{$invoice.recipient_area}</td>
        </tr>
        <tr>
            <td>邮寄地址</td>
            <td>{$invoice.recipient_address}</td>
        </tr>
        <tr>
            <td>发票备注</td>
            <td>{$invoice.remark}</td>
        </tr>
        <tr>
            <td>申请时间</td>
            <td>{$invoice.add_time}</td>
        </tr>
        <tr>
            <td>开票状态</td>
            <td>
                {if $invoice.status == 0}
                <span class="label label-default">{invoice_config::$status[$invoice.status]}</span>
                {elseif $invoice.status == 1}
                <span class="label label-warning">{invoice_config::$status[$invoice.status]}</span>
                {elseif $invoice.status == 2}
                <span class="label label-success">{invoice_config::$status[$invoice.status]}</span>
                {elseif $invoice.status == 3}
                <span class="label label-info">{invoice_config::$status[$invoice.status]}</span>
                {elseif $invoice.status == 4}
                <span class="label label-primary">{invoice_config::$status[$invoice.status]}</span>
                {elseif $invoice.status == 5}
                <span class="label label-danger">{invoice_config::$status[$invoice.status]}</span>
                {/if}
            </td>
        </tr>
        <tr>
            <td>驳回原因</td>
            <td>{$invoice.reject_remark}</td>
        </tr>
        <tr>
            <td>快递信息</td>
            <td>
                {if !empty($invoice.courier_number)}
                <p>快递公司：{$invoice.courier_company_name}</p>
                <p>快递单号：{$invoice.courier_number}</p>
                <p>邮寄时间：{$invoice.mailed_time}</p>
                <p>备注信息：{$invoice.courier_remark}</p>
                {else}
                暂无数据
                {/if}
            </td>
        </tr>
        {$order_count = count($invoice.order_list)}
        {if $order_count > 0}
        {foreach $invoice.order_list as $k => $v}
        <tr>
            {if $k == 0}
            <td rowspan="{$order_count + 1}">订单列表</td>
            {/if}
            <td>
                <p>店铺名称：{$v.title}</p>
                <p>订单编号：
                    {if $v.order_no != '操作的订单不存在'}
                    <a href="{AnUrl("order/admin/store_order?search_filter[order_code]={$v.order_no}")}" target="_blank">{$v.order_no}</a>
                    {else}
                    {$v.order_no}
                    {/if}
                </p>
                <p>下单时间：{$v.add_time}</p>
                <p>订单金额：{$v.price}</p>
                <p>商品数量：{$v.goods_num}</p>
            </td>
        </tr>
        {/foreach}
        <tr>
            <td>
                <p>订单总金额：{$invoice.order_sum_price}</p>
                <p>商品总数量：{$invoice.order_sum_goods_num} </p>
            </td>
        </tr>
        {else}
        <tr>
            <td>订单列表</td>
            <td>暂无数据</td>
        </tr>
        {/if}
    </tbody>
 </table>


{include_core file="admin/lib/footer.html"}
